#pragma once

#include "Job.h"

using namespace std;

#include <string>

#define GET_NEW_JOB_URL string("/jobs/get-new-job")
#define NO_NEW_JOBS 204
#define RETRY_TIMER 30000 // 30 sec sleep
#define OUTPUT_FORMAT ".jpeg"

/* Employee class
 * the main class in the program, runs the employee main loop
 */
class Employee {
public:
    /* Employee c'tor
     * Gets the server paramaters
     */
	Employee(const string& serverAddress, unsigned short port);
    /* runs the employee main loop */
    void run();
private:
    /* builds the string "/photos/[resourceId]?rep=[representationId]" */
    string getResourceUrl(int resourceId, int representationId);
    /* saves the server address */
    string serverAddress;
    /* saves the server port */
    unsigned short port;
};

